<template>
  <section class="content">
  <div class="creat-order-container">
    <!--名称-->
    <div class="title-box">
      <p class="page-title">{{isEdited ? '编辑订单':'新增订单'}}</p>
    </div>
     <!--订单信息-->
    <div class="order-info-box">
      <div class="title-name">
        <p class="name">订单信息 <i @click="infoShow = !infoShow" style="float: right" :class="infoShow ? 'el-icon-arrow-down':'el-icon-arrow-up'"></i></p>
      </div>
      <div v-if="infoShow" class="info-order">
        <el-row>
          <el-col :span="12">
            <div class="grid-content">
              <p><span class="need">订单编号：</span></p>
              <div class="content-desc" v-if="isEdited">{{orderInfo.platformOrderId}}</div>
              <el-input v-model.trim="orderInfo.platformOrderId"
                        v-if="!isEdited"
                        placeholder=""></el-input>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span class="need">订单时间：</span></p>
              <div class="content-desc" v-if="isEdited">{{orderInfo.orderTime}}</div>
              <el-date-picker v-if="!isEdited"  v-model="orderInfo.orderTime" placeholder="输入订单时间" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" type="datetime"></el-date-picker>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div class="grid-content">
              <p><span class=""> 销售记录号：</span></p>
              <el-input v-model.trim="orderInfo.record"  placeholder=""></el-input>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span class="need">币种：</span></p>
              <el-select v-model="orderInfo.currency" placeholder="请选择币种">
                <el-option v-for="item in currencyList" :key="item.codeValue" :label="item.codeValue" :value="item.codeValue"></el-option>
              </el-select>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div class="grid-content">
              <p><span class="need"> 订单渠道：</span></p>
              <div class="content-desc" v-if="isEdited">{{handleChoseChannel(orderInfo.orderChannelSelect)}}</div>
              <el-select  v-if="!isEdited" v-model="orderInfo.orderChannelSelect" @change="changeChanner" placeholder="请选择订单渠道">
                <el-option v-for="item in orderInfo.orderChannel" :key="item.id" :label="item.platformName" :value="item.id"></el-option>
              </el-select>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span class="need">店铺：</span></p>
              <div class="content-desc" v-if="isEdited">{{orderInfo.storeName}}</div>
              <el-select v-if="!isEdited" :disabled="disabled" v-model="orderInfo.storeSelect" @change="changeShop" placeholder="请选择店铺">
                <el-option v-for="item in orderInfo.store" :key="item.id" :label="item.name" :value="item.id"></el-option>
              </el-select>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <!--<el-col :span="12">-->
            <!--<div class="grid-content">-->
              <!--<p><span class="need"> 订单金额：</span></p>-->
              <!--<el-input v-model.trim="orderInfo.loansReceivable" placeholder="保留2位小数"></el-input>-->
            <!--</div>-->
          <!--</el-col>-->
          <el-col :span="12">
            <div class="grid-content" style="line-height: 40px;">
              <p><span class="need"> 商品总额：</span></p>
              <div class="content-desc">{{orderInfo.total}}</div>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span >邮资：</span></p>
              <el-input  v-model.trim="orderInfo.thePostageReceivable"  placeholder="保留2位小数"></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div class="grid-content">
              <p><span> 平台费用：</span></p>
              <el-input v-model.trim="orderInfo.costOfPlatform" placeholder="保留2位小数"></el-input>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span class="">转帐费：</span></p>
              <el-input v-model.trim="orderInfo.transitionFee"  placeholder="保留2位小数"></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div class="grid-content">
              <p><span class="need"> 收款账号：</span></p>
              <el-select  v-model="orderInfo.shroffAccountNum" placeholder="请选择收款账户">
                <el-option v-for="item in accoutList" :key="item" :label="item" :value="item"></el-option>
              </el-select>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span>付款时间：</span></p>
              <el-date-picker v-model="orderInfo.payTime" type="datetime" placeholder="请输入付款时间" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div class="grid-content">
              <p><span class=""> 退补类型：</span></p>
              <el-select v-model="orderInfo.treatType" placeholder="请选择退补类型">
                <el-option v-for="item in retreatingType" :key="item.code" :label="item.codeValue" :value="item.code"></el-option>
              </el-select>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span class="">退补金额：</span></p>
              <el-input v-model.trim="orderInfo.treatMoney"  placeholder=""></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div class="grid-content" style="height: 40px;">
              <p><span class="need"> 申报类型：</span></p>
              <el-radio-group v-model="orderInfo.orderType">
                <el-radio disabled="true" :label="1">9610模式</el-radio>
                <el-radio disabled="true" :label="0">非9610报关单模式</el-radio>
                <el-radio disabled="true" :label="2">非9610物流单模式</el-radio>
              </el-radio-group>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p><span :class="orderInfo.orderType == 1 ? 'need':''"> 支付交易流水号：</span></p>
              <el-input v-model.trim="orderInfo.payNo"  placeholder="支付交易流水号"></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div class="grid-content">
              <p><span :class="orderInfo.orderType == 1 ? 'need':''"> 物流渠道：</span></p>
              <el-select v-model="orderInfo.logistics" placeholder="请选择">
                <el-option v-for="item in logisticsList" :key="item.code" :label="item.codeValue" :value="item.code"></el-option>
              </el-select>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span class="">物流单号：</span></p>
              <el-input v-model.trim="orderInfo.billCode" placeholder=""></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div class="grid-content">
              <p><span> 分运单号：</span></p>
              <el-input v-model.trim="orderInfo.assbillNo"  placeholder="分运单号"></el-input>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
            <p><span> 大包裹号：</span></p>
            <el-input v-model="orderInfo.bigPackageNo"  placeholder="大包裹号"></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div class="grid-content">
              <p><span> 小包数量：</span></p>
              <el-input v-model.trim="orderInfo.smallPackageNo"  placeholder="小包数量"></el-input>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span>申报关区代码：</span></p>
              <el-input v-model.trim="orderInfo.customsNo" placeholder="申报关区代码"></el-input>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>
    <!--留言和备注-->
    <div class="message-remark">
      <div class="left-message">
        <div class="title-name">
          <p class="name">平台留言 <i @click="platShow = !platShow" style="float: right" :class="platShow ? 'el-icon-arrow-down':'el-icon-arrow-up'"></i></p>
        </div>
        <div class="text-area" v-if="platShow">
          <el-input type="textarea" :rows="6" placeholder="请输入内容" v-model.trim="message"></el-input>
        </div>

      </div>
      <div class="right-remark">
        <div class="title-name" >
          <p class="name">订单备注 <i @click="markShow = !markShow" style="float: right" :class="markShow ? 'el-icon-arrow-down':'el-icon-arrow-up'"></i></p>
        </div>
        <div class="text-area" v-if="markShow">
          <el-input type="textarea" :rows="6" placeholder="请输入内容" v-model.trim="remark"></el-input>
        </div>

      </div>
    </div>
    <!--客户信息-->
    <div class="client-info">
      <div class="title-name">
        <p class="name">客户信息 <i @click="clientShow = !clientShow" style="float: right" :class="clientShow ? 'el-icon-arrow-down':'el-icon-arrow-up'"></i></p>
      </div>
      <div v-if="clientShow" class="client-content">
        <el-row>
          <el-col :span="12" class="client-padding">
            <div class="grid-content">
              <p><span class="need">客户ID：</span></p>
              <div class="content-desc" v-if="isEdited">{{customerInfo.buyerId}}</div>
              <el-input  v-if="!isEdited" v-model.trim="customerInfo.buyerId" placeholder=""></el-input>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span class="need">客户姓名：</span></p>
              <div class="content-desc" v-if="isEdited">{{customerInfo.firstName}}-{{customerInfo.lastName}}</div>
              <div class="client"  v-if="!isEdited">
                <el-input class="client-name" v-model.trim="customerInfo.firstName" placeholder="firstName" style="width: 100%"></el-input> -  <el-input class="client-name" style="width: 100%" v-model="customerInfo.lastName" placeholder="lastName"></el-input>
              </div>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12" class="client-padding">
            <div class="grid-content">
              <p><span class="need">收货人：</span></p>
              <div class="client">
                <el-input class="client-name" v-model.trim="customerInfo.receiverFirstName" placeholder="firstName" style="width: 100%"></el-input> -  <el-input class="client-name" style="width: 100%" v-model.trim="customerInfo.receiverLastName" placeholder="lastName"></el-input>
              </div>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content"></div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12" class="client-padding">
            <div class="grid-content">
              <p><span class="need">联系电话：</span></p>
              <el-input v-model.trim="customerInfo.contactNumFrist"  placeholder=""></el-input>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span>联系电话2：</span></p>
              <el-input v-model.trim="customerInfo.contactNumSec"  placeholder=""></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12" class="client-padding">
            <div class="grid-content">
              <p><span class="need">联系邮箱：</span></p>
              <el-input v-model.trim="customerInfo.contactEmail" placeholder=""></el-input>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span class="need">所属国家：</span></p>
              <el-select v-model="customerInfo.homeCountrySelectCode" placeholder="请选择所属国家" @change="handleDealCountry">
                <el-option v-for="item in customerInfo.homeCountry" :key="item.code" :label="item.name" :value="item.code"></el-option>
              </el-select>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12" class="client-padding">
            <div class="grid-content">
              <p><span class="">省/州：</span></p>
              <el-input v-model.trim="customerInfo.provincialState" placeholder=""></el-input>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span class="">所属城市：</span></p>
              <el-input v-model.trim="customerInfo.city" placeholder="所属城市"></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12" class="client-padding">
            <div class="grid-content">
              <p><span>邮编：</span></p>
              <el-input v-model.trim="customerInfo.postcode"  placeholder=""></el-input>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="grid-content">
              <p class="second"><span class="">门牌号：</span></p>
              <el-input v-model.trim="customerInfo.houseNum" placeholder=""></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <div class="grid-content">
              <p style="min-width: 150px;max-width: 150px;"><span class="need">邮寄地址：</span></p>
              <el-input v-model.trim="customerInfo.mailingAddress" placeholder=""></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <div class="grid-content">
              <p style="min-width: 150px;max-width: 150px;"><span>备用地址：</span></p>
              <el-input v-model.trim="customerInfo.standbyAddress" placeholder=""></el-input>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>

    <div class="goods-info">
      <div class="title-name">
        <p class="name">商品信息 <i @click="goodsShow = !goodsShow" style="float: right" :class="goodsShow ? 'el-icon-arrow-down':'el-icon-arrow-up'"></i></p>
      </div>
      <div v-if="goodsShow" class="goods-table">
        <div class="add-goods">
          <el-button type="primary" @click="addPdocutc">添加商品</el-button>
        </div>
        <el-table :data="productInfo.productList"  style="width: 100%">
          <el-table-column prop="erpSku" label="商品SKU" width="240">
            <template slot-scope="scope">
              <el-input placeholder="请输入内容"  v-model.trim="scope.row.erpSku" class="input-with-select">
                <el-button type="primary"   v-if="!modal"
                           @click="chooseProduct(scope.$index)" slot="append">选择</el-button>
                <el-button type="primary"  data-toggle="modal" v-if="modal"  data-target="#modal-default"
                           @click="chooseProduct(scope.$index)" slot="append">选择</el-button>
              </el-input>
            </template>
          </el-table-column>
          <el-table-column prop="sku" label="平台SKU" width="180">
            <template slot-scope="scope">
              <el-input v-model.trim="scope.row.sku" disabled placeholder=""></el-input>
            </template>
          </el-table-column>
          <el-table-column prop="price" label="单价">
            <template slot-scope="scope">
              <el-input v-model.trim="scope.row.price"  placeholder=""></el-input>
            </template>
          </el-table-column>
          <el-table-column prop="quantity" label="发货数量">
            <template slot-scope="scope">
              <el-input v-model.trim="scope.row.quantity"  placeholder=""></el-input>
            </template>
          </el-table-column>
          <el-table-column  label="操作">
            <template slot-scope="scope">
              <i class="el-icon-delete"  @click="deleteProduct(scope.$index)"></i>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>

    <div class="modal fade" id="modal-default">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">选择商品</h4>
          </div>
          <div class="modal-body">
            <div class="form-horizontal">
              <div class="">
                <div class="form-group">
                  <div class="col-sm-12 flex">
                    <label for="" class="control-label min-width">系统SKU：</label>
                    <div class="inline-block">
                      <input type="text" class="form-control pull-left" v-model="productParams.erpSku"
                              placeholder="请输入商品编码">
                      <el-button type="success" @click="searchProduct">搜&nbsp;索</el-button>
                      <el-button type="info" @click="resetProduct">重&nbsp;置</el-button>
                    </div>
                  </div>
                </div>
                <div class="form-group">
                  <div class="col-sm-12">
                    <table id="example4" class="table table-bordered table-hover marginNonde">
                      <thead>
                      <tr>
                        <th>
                          <label>
                            <!--<input type="checkbox" class="flat-red">-->
                          </label>
                        </th>
                        <th>商品图片</th>
                        <th>商品信息</th>
                        <th>平台</th>
                        <th>平台SKU</th>
                      </tr>
                      </thead>
                      <tbody>
                         <tr v-for="( productListItem,index) in addPdocutcList" :key="index">
                        <td>
                          <label>
                           <!-- <el-checkbox :id="index" :label="JSON.stringify(productListItem)">{{}}</el-checkbox>-->
                            <input  type="checkbox" class="flat-red" autocomplate="off"  :value="productListItem" v-model="checkProduct"/>
                          </label>
                        </td>
                        <td>
                          <img :src="productListItem.goods_pic" alt="">
                        </td>
                        <td class="text-left">
                          <label class="m-l-10">
                            <p>
                              <label>系统SKU：</label>
                              <span>{{productListItem.erpSku}}</span>
                            </p>
                            <p>
                              <label>商品名称：</label>
                              <span>{{productListItem.goods_cn}}</span>
                            </p>
                            <p>
                              <label>品牌名称：</label>
                              <span>{{productListItem.brand_name}}</span>
                            </p>
                          </label>
                        </td>
                        <td>{{handleChoseChannel(productListItem.channel)}}</td>
                        <td>{{productListItem.sku}}</td>
                      </tr>
                      </tbody>
                    </table>
                    <template class="clearfix">
                      <div class="m-t-15 pull-right">
                        <el-pagination
                          background
                          layout="prev, pager, next"
                          :current-page="pages.current"
                          @current-change="pagechange"
                          :page-count="pages.total">
                        </el-pagination>
                      </div>
                    </template>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <el-button v-if="checkProduct.length == 1"  @click="submitProduct" data-dismiss="modal" type="primary">保存</el-button>
            <el-button  v-else  @click="submitProduct"  type="primary">保存</el-button>
            <el-button data-dismiss="modal">关闭</el-button>
          </div>
        </div>
        <!-- /.modal-content -->
      </div>
      <!-- /.modal-dialog -->
    </div>

    <transition name="fade">
      <div v-if="errorShow" class="gritter-notice-wrapper " :class="{'success-notice-wrapper':errorClass}">
        <div id="gritter-item-4" class="gritter-item-wrapper gritter-error" style="" role="alert">
          <div class="gritter-item"><a class="gritter-close" tabindex="1" @click="closeError"><i
            class="fa fa-close"></i></a>
            <div class="gritter-without-image"><span class="gritter-title">{{errorTitle}}</span>
              <p>{{errorMsg}}</p></div>
          </div>
        </div>
      </div>
    </transition>
    <div class="buttons">
      <el-button type="primary" v-show="orderType === '1'" @click="submitOrderDetail(3)">提交跨境申报</el-button>
      <el-button type="primary" v-show="orderType === '2'" @click="submitOrderDetail(1)">提交订单申报</el-button>
      <el-button type="primary" v-show="orderType === '3'" @click="submitOrderDetail(2)">提交收款单申报</el-button>
      <el-button type="primary" v-if="!isEdited" @click="continueAddOrderDetail(2)">继续添加</el-button>
      <el-button @click="closeBack">返回</el-button>
    </div>
  </div>
<!--    <section class="content">

      <div class="row form-group">
        <div class="col-xs-8">
          <div class="box">
            <div class="box-header" style="border-bottom: 1px solid rgb(226, 225, 225)">
              <h3 class="box-title">订单信息</h3>
            </div>
            &lt;!&ndash; /.box-header &ndash;&gt;
            <div class="box-body" style="overflow: hidden">
              <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                <div class="col-sm-6 flex">
                  <label class="control-label min-width"><sub class="text-red">*</sub>订单编号：</label>
                  <div class="inline-block">
                    <input type="text" class="form-control" v-model="orderInfo.platformTransactionNum">
                  </div>
                </div>
                <div class="col-sm-6 flex">
                  <label class="control-label min-width"><sub class="text-red">*</sub>订单时间：</label>
                  <div class="inline-block">
                    <el-date-picker class="linehe"
                                    v-model="orderInfo.orderTime"
                                    type="datetime"
                                    placeholder="输入订单时间" format="yyyy-MM-dd HH:mm:ss"
                                    value-format="yyyy-MM-dd HH:mm:ss">
                    </el-date-picker>
                    &lt;!&ndash;<input type="text" placeholder="输入订单时间" class="form-control" v-model="orderInfo.orderTime">&ndash;&gt;
                  </div>
                </div>

              </div>
              <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                <div class="col-sm-6 flex">
                  <label class="control-label min-width"><sub class="text-red">*</sub>订单渠道：</label>
                  <div class="inline-block">
                    <select class="form-control" v-model="orderInfo.orderChannelSelect" @change="changeChanner">
                      <option value="">请选择平台</option>
                      <option :value="orderChannelItem.id" v-for="orderChannelItem in orderInfo.orderChannel">
                        {{orderChannelItem.platformName}}
                      </option>
                    </select>
                  </div>
                </div>
                <div class="col-sm-6 flex">
                  <label class="control-label min-width"><sub class="text-red">*</sub>店铺：</label>
                  <label class="payment" v-if="orderInfo.store.length == 0">
                    <i class="fa fa-warning"></i>
                    您当前还未添加店铺
                    <router-link to="/v1/author/getPlatFrom"><a class="text-red text-bold" target="_blank">【立即添加】</a>
                    </router-link>
                  </label>
                  <div class="inline-block" v-else>
                    <select :disabled="disabled" class="form-control pull-left" style="width: 84%"
                            v-model="orderInfo.storeSelect" @change="changeShop">
                      <option value="">请选择店铺</option>
                      <option :value="storeItem.id" v-for="storeItem in orderInfo.store">{{storeItem.name}}</option>
                    </select>
                    &lt;!&ndash;<router-link to="/v1/author/getShoplist"><label class="control-label curren text-green pull-right" style="padding-right: 0;">店铺管理</label></router-link>&ndash;&gt;
                  </div>
                </div>
              </div>
              <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                <div class="col-sm-6 flex">
                  <label class="control-label min-width"><sub class="text-red">*</sub>应收货款：</label>
                  <div class="inline-block">
                    <div class="input-group">
                      <input type="text" class="form-control" v-model="orderInfo.loansReceivable"><span
                      class="input-group-addon">USD</span>
                    </div>
                  </div>
                </div>
                <div class="col-sm-6 flex">
                  <label class="control-label min-width">应收邮资：</label>
                  <div class="inline-block">
                    <div class="input-group">
                      <input type="text" class="form-control" v-model="orderInfo.thePostageReceivable"><span
                      class="input-group-addon">USD</span>
                    </div>
                  </div>
                </div>
              </div>
              <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                <div class="col-sm-6 flex">
                  <label class="control-label min-width">平台费用：</label>
                  <div class="inline-block">
                    <div class="input-group">
                      <input type="text" class="form-control" v-model="orderInfo.costOfPlatform"><span
                      class="input-group-addon">USD</span>
                    </div>
                  </div>
                </div>
                <div class="col-sm-6 flex">
                  <label class="control-label min-width">转账费：</label>
                  <div class="inline-block">
                    <div class="input-group">
                      <input type="text" class="form-control" v-model="orderInfo.transitionFee"><span
                      class="input-group-addon">USD</span>
                    </div>
                  </div>
                </div>
              </div>
              <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                <div class="col-sm-6 flex">
                  <label class="control-label min-width">收款账号：</label>
                  <div class="inline-block">
                    <select :disabled="accountDisabled" class="form-control" v-model="orderInfo.shroffAccountNum">
                      <option value="">请选择收款账号</option>
                      <option :value="orderChannelItem" v-for="orderChannelItem in accoutList">{{orderChannelItem}}
                      </option>
                    </select>
                  </div>
                </div>
                <div class="col-sm-6 flex">
                  <label class="control-label min-width">付款时间：</label>
                  <div class="inline-block">
                    <div class="">
                      <el-date-picker
                        v-model="orderInfo.payTime"
                        type="datetime"
                        placeholder="请输入付款时间" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss">
                      </el-date-picker>
                      &lt;!&ndash;<input  type="text" class="form-control" v-model="orderInfo.payTime" id="payTime" placeholder="请输入付款时间">&ndash;&gt;
                    </div>
                  </div>
                </div>
              </div>
            </div>
            &lt;!&ndash; /.box-body &ndash;&gt;
          </div>
          &lt;!&ndash; /.box &ndash;&gt;
        </div>
      </div>

      <div class="row form-group">
        <div class="col-xs-8">
          <div class="box">
            <div class="box-header" style="border-bottom: 1px solid rgb(226, 225, 225)">
              <h3 class="box-title p-lr-10">客户信息</h3>
            </div>
            &lt;!&ndash; /.box-header &ndash;&gt;
            <div class="box-body" style="overflow: hidden">
              <div>
                <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                  <div class="col-sm-6 flex">
                    <label class="control-label min-width"><sub class="text-red">*</sub>客户ID：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control" v-model="customerInfo.customerID">
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-6 flex">
                    <label class="control-label min-width"><sub class="text-red">*</sub>客户姓名：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control pull-left" style="width: 47%"
                               v-model="customerInfo.firstName"><span class="pull-left"
                                                                      style="width: 6%;text-align:center;line-height: 34px">-</span>
                        <input type="text" class="form-control pull-right" style="width: 47%"
                               v-model="customerInfo.lastName">
                      </div>
                    </div>
                  </div>
                </div>
                <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                  <div class="col-sm-6 flex">
                    <label class="control-label min-width">联系电话1：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control" v-model="customerInfo.contactNumFrist">
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-6 flex">
                    <label class="control-label min-width">联系电话2：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control" v-model="customerInfo.contactNumSec">
                      </div>
                    </div>
                  </div>
                </div>
                <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                  <div class="col-sm-6 flex">
                    <label class="control-label min-width">联系邮箱：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control" v-model="customerInfo.contactEmail">
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-6 flex">
                    <label class="control-label min-width"><sub class="text-red">*</sub>所属国家：</label>
                    <div class="inline-block">
                      <div class="">
                        <select class="form-control" v-model="customerInfo.homeCountrySelect">
                          <option value="">请选择国家</option>
                          <option :value="homeCountryItem" v-for="homeCountryItem in customerInfo.homeCountry">
                            {{homeCountryItem.name}}
                          </option>
                        </select>
                      </div>
                    </div>
                  </div>
                </div>
                <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                  <div class="col-sm-6 flex">
                    <label class="control-label min-width">省/州：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control" v-model="customerInfo.provincialState">
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-6 flex">
                    <label class="control-label min-width">所属城市：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control" v-model="customerInfo.city">
                      </div>
                    </div>
                  </div>
                </div>
                <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                  <div class="col-sm-6 flex">
                    <label class="control-label min-width">邮编：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control" v-model="customerInfo.postcode">
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-6 flex">
                    <label class="control-label min-width">门牌号：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control" v-model="customerInfo.houseNum">
                      </div>
                    </div>
                  </div>
                </div>
                <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                  <div class="col-sm-12 flex">
                    <label class="control-label min-width"><sub class="text-red">*</sub>邮寄地址：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control" v-model="customerInfo.mailingAddress">
                      </div>
                    </div>
                  </div>
                </div>
                <div style="padding: 4px 0;border-bottom: 1px solid #f4f4f4" class="row">
                  <div class="col-sm-12 flex">
                    <label class="control-label min-width">备用地址：</label>
                    <div class="inline-block">
                      <div class="">
                        <input type="text" class="form-control" v-model="customerInfo.standbyAddress">
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            &lt;!&ndash; /.box-body &ndash;&gt;
          </div>
          &lt;!&ndash; /.box &ndash;&gt;
        </div>
      </div>


      <div class="row form-group">
        <div class="col-xs-8">
          <div class="box">
            <div class="box-header" style="border-bottom: 1px solid rgb(226, 225, 225)">
              <h3 class="box-title">商品信息</h3>
              <button class="btn btn-primary pull-right" @click="addPdocutc">添加商品</button>
            </div>
            &lt;!&ndash; /.box-header &ndash;&gt;
            <div class="box-body" style="overflow: hidden">
              <table class="table table-bordered">
                <thead class="bg-info">
                <tr>
                  <th>
                    <input type="checkbox">
                  </th>
                  <th style="width: 25%"><sub class="text-red">*</sub>库存商品</th>
                  <th style="width: 15%">平台sku</th>
                  <th style="width: 15%;">单价</th>
                  <th style="width: 20%;">发货仓库</th>
                  <th style="width: 10%">发货数量</th>
                  <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr v-if="productInfo.productList.length == 0">
                  <td colspan="7">
                    没有数据
                  </td>
                </tr>
                <tr v-else v-for="(productListItem,index) in productInfo.productList" :key="index">
                  <td>
                    <input type="checkbox">
                  </td>
                  <td>
                    <div class="flex">
                      <label class="control-label" v-if="productListItem.pic"
                             style="display: flex;align-items: center;">
                        <img :src="productListItem.pic">
                      </label>
                      <div class="inline-block text-left">
                        <div>
                          <div class="input-group">
                            <input class="form-control" placeholder="" v-model="productListItem.sku" disabled>
                            <span class="input-group-addon bg-green curren" data-toggle="modal"
                                  data-target="#modal-default" @click="chooseProduct(index)">更换</span>
                          </div>
                          <p class="m-t-15" v-if="productListItem.productInfo">{{productListItem.productInfo}}</p>
                        </div>
                      </div>
                    </div>
                  </td>
                  <td>
                    <input type="text" class="form-control" v-model="productListItem.ebaySKU">
                  </td>
                  <td :class="">
                    <input type="text" class="form-control" v-model="productListItem.unitPrice">
                  </td>
                  <td>
                    <select class="form-control" v-model="productListItem.warehouseSelect"
                            @change="chooseWh(productListItem.warehouseSelect)">
                      <option value="">请选择发货仓库</option>
                      <option v-for="warehouseItem in productListItem.warehouse" :value="warehouseItem.whId">
                        {{warehouseItem.whName}}({{warehouseItem.stockQty}})
                      </option>
                    </select>
                  </td>
                  <td :class="">
                    <input type="text" class="form-control" v-model="productListItem.shipmentsNum"
                           @blur="blurShipmentsNum(index)">
                  </td>
                  <td>
                    <span class="text-blue curren" @click="addInventory(productListItem)">添加库存商品</span>
                    <p>
                      <span class="text-red curren" @click="deleteProduct(index)">删除该商品</span>
                    </p>
                  </td>
                </tr>
                </tbody>
              </table>

              <div class="row text-center m-t-27">
                <button class="btn btn-primary m-lr-10" @click="submitOrderDetail">确认</button>
                <button class="btn btn-primary m-lr-10" @click="continueAddOrderDetail">继续添加</button>
                <router-link :to="{path:'/v1/order/0/list/1'}" class="text-white m-lr-10">
                  <button class="btn btn-default m-lr-10">返回</button>
                </router-link>
              </div>
            </div>
            &lt;!&ndash; /.box-body &ndash;&gt;
          </div>
          &lt;!&ndash; /.box &ndash;&gt;
        </div>
      </div>

      <div class="modal fade" id="modal-default">
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span></button>
              <h4 class="modal-title">选择商品</h4>
            </div>
            <div class="modal-body">
              <div class="form-horizontal">
                <div class="">
                  <div class="form-group">
                    <div class="col-sm-12 flex">
                      <label for="" class="control-label min-width">输入搜索：</label>
                      <div class="inline-block">
                        <input type="text" class="form-control pull-left" v-model="productParams.sku"
                               style="width: 350px" placeholder="请输入商品编码">
                        <button class="btn btn-success pull-left m-lr-10" @click="searchProduct">搜&nbsp;索</button>
                        <button class="btn btn-danger pull-left m-lr-10" @click="resetProduct">重&nbsp;置</button>
                      </div>
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="col-sm-12">
                      <table id="example4" class="table table-bordered table-hover marginNonde">
                        <thead>
                        <tr>
                          <th>
                            <label>
                              &lt;!&ndash;<input type="checkbox" class="flat-red">&ndash;&gt;
                            </label>
                          </th>
                          <th>商品图片</th>
                          <th>商品信息</th>
                          <th>库存总量</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="productListItem in addPdocutcList">
                          <td>
                            <label>
                              <input type="checkbox" class="flat-red" :value="productListItem" v-model="checkProduct">
                            </label>
                          </td>
                          <td>
                            <img :src="productListItem.goodsPic" alt="">
                          </td>
                          <td class="text-left">
                            <label class="m-l-15">
                              <p>
                                <label>商品编码：</label>
                                <span>{{productListItem.sku}}</span>
                              </p>
                              <p>
                                <label>商品名称：</label>
                                <span>{{productListItem.goodsName}}</span>
                              </p>
                              <p>
                                <label>品牌名称：</label>
                                <span>{{productListItem.brandName}}</span>
                              </p>
                            </label>
                          </td>
                          <td>{{productListItem.countStock}}</td>
                        </tr>
                        </tbody>
                      </table>
                      <template class="clearfix">
                        <div class="m-t-15 pull-right">
                          <pagination :total="pages.total" :current-page='pages.current' :display="pages.display"
                                      @pagechange="pagechange"></pagination>
                        </div>
                      </template>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="modal-footer">
              <button v-if="checkProduct.length == 1" type="button" class="btn btn-primary" data-dismiss="modal"
                      @click="submitProduct">保存
              </button>
              <button v-else type="button" class="btn btn-primary" @click="submitProduct">保存</button>
              <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
          </div>
          &lt;!&ndash; /.modal-content &ndash;&gt;
        </div>
        &lt;!&ndash; /.modal-dialog &ndash;&gt;
      </div>

      <transition name="fade">
        <div v-if="errorShow" class="gritter-notice-wrapper " :class="{'success-notice-wrapper':errorClass}">
          <div id="gritter-item-4" class="gritter-item-wrapper gritter-error" style="" role="alert">
            <div class="gritter-item"><a class="gritter-close" tabindex="1" @click="closeError"><i
              class="fa fa-close"></i></a>
              <div class="gritter-without-image"><span class="gritter-title">{{errorTitle}}</span>
                <p>{{errorMsg}}</p></div>
            </div>
          </div>
        </div>
      </transition>

    </section>-->
  </section>

</template>

<script>
  import instance from '@/api/index.js'

  export default {
    name: 'borderCreateOrder',
    data() {
      return {
        disabled: false,//店铺可选标识
        accountDisabled: false,//收款账号可选标识
        orderInfo: {//订单信息
          id: null,
          platformOrderId: null,//平台交易号
          orderTime: '',//订单时间
          orderChannel: [],//订单渠道
          orderChannelSelect: null,//订单渠道选择
          store: [],//店铺
          storeSelect: null,//店铺选择
          loansReceivable: '',//应收货款
          thePostageReceivable: null,//应收邮资
          costOfPlatform: '',//平台费用
          transitionFee: null,//转账费
          shroffAccountNum: '',//收款账号
          payTime: '',//付款时间
          record:null,//销售记录号
          treatMoney:null,//退补金额
          billCode:'',//物流单号
          logistics:'',//物流渠道
          customsNo:null,//申报关区代码
          payNo:null,//支付交易流水号
          currency:'',//货币代码
          treatType:'',
          orderType: 1,
          assbillNo:'',
          bigPackageNo:'',
          smallPackageNo:'',
          storeName:'',
          total: 0,
        },
        customerInfo: {//客户信息
          buyerId: '',//客户ID buyerId
          firstName: '',//客户姓名
          lastName: '',//客户姓名
          receiverFirstName:'',//
          receiverLastName:'',//
          contactNumFrist: null,//联系电话1
          contactNumSec: null,//联系电话2
          contactEmail: '',//联系邮箱
          homeCountry: '',//所属国家
          homeCountrySelectCode: '',//所属国家选择 code
          homeCountrySelectName:'',//所属国家选择 name
          provincialState: '',//省/洲
          city: '',//所属城市
          postcode: null,//邮编
          houseNum: '',//门牌号
          mailingAddress: '',//邮寄地址
          standbyAddress: ''//备用地址
        },
        message:'',//平台留言说明
        remark:'',//订单备注
        productInfo: {//商品信息
          productList: [],//商品列表
        },
        currencyList:[],//币种列表
        checkProduct: [],
        checkedNames:[],
        orderDetailInfo: {
          currency: '',
          orderType: 1,
          assbillNo: '',
          bigPackageNo: '',
          smallPackageNo: '',
          payNo: '',
          platformOrderId: '',
          channel: '',
          account: '',
          total: null,
          storeId: null,
          payTimeStr: '',
          buyerId: '',
          name: '',
          phone: '',
          otherPhone: '',
          country: '',
          countryName: '',
          state: '',
          city: '',
          postalCode: '',
          street1: '',
          street2: '',
          mail: '',
          houseNumber: '',
          platformFee: '',
          transferFee: '',
          remark: '',
          orderCreated: '',
          shipping: null,
          items: [],
          declareType: 1,
          id:null,
          record:null,//销售记录号
          treatType:'',
          treatMoney:null,//退补金额
          billCode:'',//物流单号
          logistics:'',//物流渠道
          customsNo:null,//申报关区代码
        },
        addPdocutcList: [],
        productParams: {},
        pages: {
          total: 0,
          current: 1,
          display: 10,
        },
        indexProduct: '',//获取下标
        errorShow: false,//错误显示
        errorMsg: '',//错误信息
        errorTitle: '',//错误提示标题
        errorClass: false,//错误样式
        accoutList:[],
        styleObj:{background:'#F5F7FA'},
        retreatingType:[],
        modal:'',
        orderIdEdited:'',
        orderType: '',
        isEdited:false,
        infoShow:true,
        platShow:true,
        markShow:true,
        clientShow:true,
        goodsShow:true,
        logisticsList:[]
      }

    },
    methods: {
      /*选择国家之后赋值国家名称*/
      handleDealCountry(){
        this.customerInfo.homeCountry.forEach((item,index)=>{
          if (item.code == this.homeCountrySelectCode){
            this.homeCountrySelectName = item.name;
          }
        })
      },
      //获取平台列表或者下拉框
      getPlatFormList: function () { //获取平台列表或者下拉框
        let vm = this;
        vm.disabled = true;
        vm.accountDisabled = true;
        instance({
          method: 'post',
          url: '/v1/author/getPlatFrom'
        }).then(function (data) {
          if (data.data.success) {
            vm.orderInfo.orderChannel = data.data.data;
          }
        });
      },
      //店铺变化收款账号也变化
      changeShop: function () {
        let vm = this;
        if (!vm.orderInfo.storeSelect) {
          vm.accountDisabled = true;
          vm.accoutList = [];
          return;
        }
        vm.accountDisabled = false;
        for(let i = 0; i < vm.orderInfo.store.length; i++){
          if(vm.orderInfo.storeSelect == vm.orderInfo.store[i].id){
            vm.accoutList = vm.orderInfo.store[i].accounts;
          }
        }
      },
      //订单渠道变化店铺也变化
      changeChanner: function () {
        let vm = this;
        if (!vm.orderInfo.orderChannelSelect) {
          vm.disabled = true
          this.modal = false
          return;
        }
        this.modal = true
        vm.disabled = false;
        vm.getStore(vm.orderInfo.orderChannelSelect);
      },

      //提交订单
      submitOrderDetail: function (sourceFlag) {
        let vm = this;
        //校验数据；
        if (!vm.orderInfo.platformOrderId) {
          vm.$alert('请输入订单编号！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }


        if (!vm.orderInfo.currency) {
          vm.$alert('请选择币种！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        /*      if (!vm.orderInfo.transitionFee) {
                vm.$alert('请输入转会费！', '提示', {
                  confirmButtonText: '确定',
                });
                return;
              }*/
        if (!vm.orderInfo.shroffAccountNum) {
          vm.$alert('请输入收款账号！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        /*    if (!vm.orderInfo.treatMoney) {
              vm.$alert('请输入退补金额！', '提示', {
                confirmButtonText: '确定',
              });
              return;
            }*/
        if (!vm.customerInfo.contactEmail) {
          vm.$alert('请输入联系邮箱！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        /*    if (!vm.customerInfo.houseNum) {
              vm.$alert('请输入门牌号！', '提示', {
                confirmButtonText: '确定',
              });
              return;
            }*/

        if (!vm.orderInfo.orderTime) {
          vm.$alert('请输入订单时间！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if (!vm.orderInfo.orderChannelSelect) {
          vm.$alert('请选择订单渠道！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if (!vm.orderInfo.storeSelect) {
          vm.$alert('请选择店铺！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if (!vm.orderInfo.loansReceivable) {
          vm.$alert('请输入订单金额！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if (vm.orderInfo.orderType == 1) {
          // if (!vm.orderInfo.customsNo){
          //   vm.$alert('请输入申报关区代码！', '提示', {
          //     confirmButtonText: '确定',
          //   });
          //   return;
          // }
          // if (!vm.orderInfo.assbillNo) {
          //   vm.$alert('请输入分运单号！', '提示', {
          //     confirmButtonText: '确定',
          //   });
          //   return;
          // }
          // if (!vm.orderInfo.bigPackageNo) {
          //   vm.$alert('请输入大包裹号！', '提示', {
          //     confirmButtonText: '确定',
          //   });
          //   return;
          // }
          // if (!vm.orderInfo.smallPackageNo) {
          //   vm.$alert('请输入小包数量！', '提示', {
          //     confirmButtonText: '确定',
          //   });
          //   return;
          // }
          if(!vm.orderInfo.payNo) {
            vm.$alert('请输入支付交易流水号！', '提示', {
              confirmButtonText: '确定',
            });
            return;
          }
        }
        if (!vm.customerInfo.buyerId) {
          vm.$alert('请输入客户ID！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if (!vm.customerInfo.firstName) {
          vm.$alert('请输入客户姓名！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if (!vm.customerInfo.lastName) {
          vm.$alert('请输入客户姓名！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if (!vm.customerInfo.receiverFirstName) {
          vm.$alert('请输入收货人！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if (!vm.customerInfo.receiverLastName) {
          vm.$alert('请输入收货人！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if(!vm.customerInfo.contactNumFrist) {
          vm.$alert('请输入联系电话！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }

        if (vm.orderInfo.customsNo && vm.orderInfo.customsNo.length != 4) {
          vm.$alert('申报关区代码字段值应该为4位，请确认！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if (vm.orderInfo.assbillNo && vm.orderInfo.assbillNo.length > 32) {
          vm.$alert('分运单号字段值应该小于33位，请确认！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }


        // if(!vm.orderInfo.record) {
        //   vm.$alert('请输入销售记录号！', '提示', {
        //     confirmButtonText: '确定',
        //   });
        //   return;
        // }
        // if(!vm.orderInfo.treatType) {
        //   vm.$alert('请选择退款类型！', '提示', {
        //     confirmButtonText: '确定',
        //   });
        //   return;
        // }
        // if(!vm.orderInfo.treatMoney) {
        //   vm.$alert('请输入退补金额！', '提示', {
        //     confirmButtonText: '确定',
        //   });
        //   return;
        // }
        // if(!vm.orderInfo.logistics) {
        //   vm.$alert('请输选择物流渠道！', '提示', {
        //     confirmButtonText: '确定',
        //   });
        //   return;
        // }
        // if(!vm.orderInfo.billCode) {
        //   vm.$alert('请输入物流单号！', '提示', {
        //     confirmButtonText: '确定',
        //   });
        //   return;
        // }
        // if(!vm.orderInfo.customsNo) {
        //   vm.$alert('请输入申报关区代码！', '提示', {
        //     confirmButtonText: '确定',
        //   });
        //   return;
        // }

        if (!vm.productInfo.productList || vm.productInfo.productList.length == 0) {
          vm.$alert('请添加商品！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        } else {

          for (var k = 0; k < vm.productInfo.productList.length; k++) {
            let product = vm.productInfo.productList[k];
            if (!product.sku) {
              vm.$alert('请输入平台sku！', '提示', {
                confirmButtonText: '确定',
              });
              return;
            }
            if (!product.erpSku) {
              vm.$alert('请输入系统sku！', '提示', {
                confirmButtonText: '确定',
              });
              return;
            }
            if (!product.price) {
              vm.$alert('请输入商品单价！', '提示', {
                confirmButtonText: '确定',
              });
              return;
            }
            if (!product.quantity) {
              vm.$alert('请输入发货数量！', '提示', {
                confirmButtonText: '确定',
              });
              return;
            }
          }
        }
        if(!vm.customerInfo.homeCountrySelectCode) {
          vm.$alert('请输入所属国家！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        /*     if(!vm.customerInfo.provincialState) {
               vm.$alert('请输入省/州！', '提示', {
                 confirmButtonText: '确定',
               });
               return;
             }*/
        /*     if(!vm.customerInfo.city) {
               vm.$alert('请输入所属城市！', '提示', {
                 confirmButtonText: '确定',
               });
               return;
             }*/
        if(!vm.customerInfo.mailingAddress) {
          vm.$alert('请输入邮寄地址！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }



        //验证完毕组合数据   platformOrderId
        vm.orderDetailInfo.platformOrderId = vm.orderInfo.platformOrderId;// 订单编号
        vm.orderDetailInfo.channel = vm.orderInfo.orderChannelSelect;// 订单渠道
        vm.orderDetailInfo.total = vm.orderInfo.loansReceivable;// 应收货款
        vm.orderDetailInfo.storeId = vm.orderInfo.storeSelect;// 商店
        vm.orderDetailInfo.payTimeStr = vm.orderInfo.payTime;// 付款时间
        vm.orderDetailInfo.orderCreated = vm.orderInfo.orderTime;// 订单时间
        vm.orderDetailInfo.buyerId = vm.customerInfo.buyerId;// 客户id
        vm.orderDetailInfo.customerFirstName = vm.customerInfo.firstName;// 名
        vm.orderDetailInfo.customerLastName = vm.customerInfo.lastName;// 姓
        vm.orderDetailInfo.receiverFirstName = vm.customerInfo.receiverFirstName;
        vm.orderDetailInfo.receiverLastName = vm.customerInfo.receiverLastName;
        vm.orderDetailInfo.phone = vm.customerInfo.contactNumFrist;// 联系电话
        vm.orderDetailInfo.otherPhone = vm.customerInfo.contactNumSec;// 联系电话
        vm.orderDetailInfo.country = vm.customerInfo.homeCountrySelectCode;// 国家
        vm.orderDetailInfo.countryName = vm.customerInfo.homeCountrySelectName;// 国家名称
        vm.orderDetailInfo.state = vm.customerInfo.provincialState;// 省/州
        vm.orderDetailInfo.city = vm.customerInfo.city;// 城市
        vm.orderDetailInfo.postalCode = vm.customerInfo.postcode;// 邮编 postalCode
        vm.orderDetailInfo.street1 = vm.customerInfo.mailingAddress;// 邮寄地址
        vm.orderDetailInfo.street2 = vm.customerInfo.standbyAddress;// 备用地址
        vm.orderDetailInfo.platformFee = vm.orderInfo.costOfPlatform;// 平台服务费
        vm.orderDetailInfo.transferFee = vm.orderInfo.transitionFee;// 转账费
        vm.orderDetailInfo.account = vm.orderInfo.shroffAccountNum;// 收款账户
        vm.orderDetailInfo.mail = vm.customerInfo.contactEmail;// 邮箱
        vm.orderDetailInfo.houseNumber = vm.customerInfo.houseNum;// 门牌号
        vm.orderDetailInfo.postage = vm.orderInfo.thePostageReceivable;// 运费
        vm.orderDetailInfo.message = this.message;
        vm.orderDetailInfo.remark = this.remark;
        vm.orderDetailInfo.currency = vm.orderInfo.currency;
        vm.orderDetailInfo.orderType = vm.orderInfo.orderType;
        vm.orderDetailInfo.assbillNo = vm.orderInfo.assbillNo;
        vm.orderDetailInfo.bigPackageNo = vm.orderInfo.bigPackageNo;
        vm.orderDetailInfo.smallPackageNo = vm.orderInfo.smallPackageNo;
        vm.orderDetailInfo.payNo = vm.orderInfo.payNo;
        vm.orderDetailInfo.id = vm.orderInfo.id;
        vm.orderDetailInfo.declareType = sourceFlag;
        vm.orderDetailInfo.record=vm.orderInfo.record;
        vm.orderDetailInfo.treatType=vm.orderInfo.treatType;
        vm.orderDetailInfo.treatMoney=vm.orderInfo.treatMoney;
        vm.orderDetailInfo.billCode=vm.orderInfo.billCode;
        vm.orderDetailInfo.logistics=vm.orderInfo.logistics;
        vm.orderDetailInfo.customsNo=vm.orderInfo.customsNo;
        /* vm.orderDetailInfo.items.splice(0);*/
        vm.orderDetailInfo.items=[];
        /*     vm.productInfo.productList.forEach(function (product, index) {
            /!*   let item = {
                 price: product.unitPrice,//单价
                 sku: product.ebaySKU,//sku
                 goodsId: product.goodsId, //系统商品id
                 quantity: product.shipmentsNum, //数量
                 stockId: product.warehouseSelect //仓库id
               }*!/
             /!*  vm.orderDetailInfo.items.push(item);*!/
             })*/
        vm.orderDetailInfo.items = vm.productInfo.productList;
        // Object.assign( vm.orderDetailInfo,vm.productInfo,vm.orderInfo,vm.customerInfo)
        let api = '';
        // if (this.isEdited){
        //   api = `/v1/order/confirm/${this.orderIdEdited}`
        // }else {
        //   api = '/v1/order/create'
        // }
        api = `/v1/9610/order/save/${sourceFlag}`
        instance({
          method: 'post',
          url: api,
          data: vm.orderDetailInfo
        }).then(function (data) {
          if (data.data.success) {
            vm.$alert(vm.orderIdEdited ? '编辑订单成功 ':'新增订单成功！', '提示', {
              confirmButtonText: '确定',
              callback: action => {
                // if (sourceFlag == 1){
                  vm.$router.back();
                // }
              }
            });

            //后清空数据
            vm.message = '';
            vm.remark = '';
            for (var key in vm.orderInfo) {
              if (key != 'orderChannel' && key != 'store') {
                if (key == 'orderType'){
                  vm.orderInfo[key] = 1;
                } else {
                  vm.orderInfo[key] = '';
                }

              }
            }
            for (var key in vm.customerInfo) {
              if (key !='homeCountry'){
                vm.customerInfo[key] = '';
              }
            }
            vm.productInfo.productList.splice(0);
          } else {
            vm.$alert('添加手工订单失败！', '提示', {
              confirmButtonText: '确定',
            });
          }
        })
      },
      //继续添加
      continueAddOrderDetail: function (souce) {
        let vm = this;
        //先提交订单
        this.submitOrderDetail(souce);

      },

      //定时信息提示
      setTime: function () {
        let vm = this;
        setTimeout(function () {
          vm.errorShow = false;
        }, 2500)
      },

      //关闭信息提示
      closeError: function () {
        this.errorShow = false;
      },

      //获取授权平台下的店铺
      getStore: function (_id) {
        let vm = this;
        instance({
          method: 'post',
          url: '/v1/author/getAuthorShopList',
          data: {
            id: _id,
            status: 1
          }
        }).then(function (data) {
          if (data.data.success) {
            vm.orderInfo.store = data.data.data;
          }
        })
      },

      //获取国家信息
      getCountry: function () {
        let vm = this;
        instance({
          method: 'post',
          url: 'v1/ebay/meta/country/getList',
        }).then(function (data) {
          console.log(data)
          if (data.data.success) {
            vm.customerInfo.homeCountry = data.data.data
          }
        })
      },

      //根据sku查仓库
      getStorage: function (_sku) {
        let vm = this;
        instance({
          method: 'post',
          url: '/v1/warehouse/getGoodsStockInfoList',
          data: {
            sku: _sku
          }
        }).then(function (data) {
        })
      },

      //添加商品
      addPdocutc: function () {
        let vm = this;
        let productObj = {quantity:'',erpSku:'',price:null,sku:''};
        vm.productInfo.productList.push(productObj);
        vm.productInfo.productList.forEach((item,index)=>{
          vm.productInfo.productList[index].quantity =item.quantity
        })
      },

      //删除商品
      deleteProduct: function (_index) {
        this.productInfo.productList.splice(_index, 1);
      },

      searchProduct(){
        let vm = this;
        vm.checkProduct = [];
        vm.productParams.rows = 5;
        vm.productParams.page = vm.pages.current;
        vm.pages.display = vm.productParams.rows;
        let api = `v1/goodsRelation/listGoods?page=${vm.pages.current}`
        if (this.productParams.erpSku) {
          api = api + `&erpSku=${this.productParams.erpSku}`
        }
        if(this.orderInfo.orderChannelSelect){
          api = api + `&channel=${this.orderInfo.orderChannelSelect}`
        } else {
          vm.$alert('请选择订单渠道！', '提示', {
            confirmButtonText: '确定',
          });
          return
        }
        instance({
          method: 'get',
          url: api
        }).then(function (data) {
          if (data.data.success) {
            vm.addPdocutcList = data.data.data.list;
            vm.pages.total = data.data.data.pages;
          }
        });
      },
      resetProduct(){
        let vm = this;
        vm.checkProduct = [];
        vm.productParams.rows = 5;
        vm.productParams.erpSku = '';
        vm.productParams.page = vm.pages.current;
        vm.pages.display = vm.productParams.rows;
        let api = `v1/goodsRelation/listGoods?page=${vm.pages.current}`
        if (this.productParams.erpSku) {
          api = api + `&erpSku=${this.productParams.erpSku}`
        }
        if(this.orderInfo.orderChannelSelect){
          api = api + `&channel=${this.orderInfo.orderChannelSelect}`
        } else {
          vm.$alert('请选择订单渠道！', '提示', {
            confirmButtonText: '确定',
          });
          return
        }
        instance({
          method: 'get',
          url: api
        }).then(function (data) {
          if (data.data.success) {
            vm.addPdocutcList = data.data.data.list;
            vm.pages.total = data.data.data.pages;
          }
        });
      },

      //选择产品
      chooseProduct: function (_index) {
        let vm = this;
        vm.checkProduct = [];
        vm.productParams.rows = 5;
        vm.productParams.erpSku = '';
        vm.productParams.page = vm.pages.current;
        vm.pages.display = vm.productParams.rows;
        console.log(vm.productParams)
        let api = `v1/goodsRelation/listGoods?page=${vm.pages.current}`
        if (this.productParams.erpSku) {
          api = api + `&erpSku=${this.productParams.erpSku}`
        }
        if(this.orderInfo.orderChannelSelect){
          api = api + `&channel=${this.orderInfo.orderChannelSelect}`
        } else {
          vm.$alert('请选择订单渠道！', '提示', {
            confirmButtonText: '确定',
          });
          return
        }
        instance({
          method: 'get',
          url: api,
        }).then(function (data) {
          if (data.data.success) {
            vm.addPdocutcList = data.data.data.list;
            vm.pages.total = data.data.data.pages;
            vm.indexProduct = _index;
          }
        });
      },

      // 获取分页
      pagechange: function (currentPage) {
        this.pages.current = currentPage;
        this.productParams.pages = currentPage;
        this.chooseProduct();
      },

      //保存
      submitProduct: function () {
        console.log(this.checkProduct)
        if (this.checkProduct.length == 0) {
          this.$alert('请选择一个商品！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        if (this.checkProduct.length > 1) {
          this.$alert('请选择一个商品！', '提示', {
            confirmButtonText: '确定',
          });
          return;
        }
        this.productInfo.productList[this.indexProduct].erpSku = this.checkProduct[0].erpSku;
        this.productInfo.productList[this.indexProduct].sku = this.checkProduct[0].sku;
        this.productInfo.productList[this.indexProduct].goodsId = this.checkProduct[0].id;
        let vm = this;
        instance({
          method: 'post',
          url: '/v1/warehouse/getGoodsStockInfoList',
          data: {
            sku: vm.checkProduct[0].sku
          }
        }).then(function (data) {
          if (data.data.success) {
            for (let i = 0; i < data.data.data.length; i++) {
              vm.productInfo.productList[vm.indexProduct].warehouse = data.data.data[i].stockInfoVOS;
            }
          }
        })
      },

      //选择发货仓库后仓库库存已发货数量比较
      chooseWh: function (_id) {
        let wh = this.productInfo.productList[this.indexProduct].warehouse;
        let index = wh.findIndex(function (item) {
          return item.whId == _id
        });
        let stockQty = this.productInfo.productList[this.indexProduct].warehouse[index]["stockQty"];
        this.productInfo.productList[this.indexProduct].stockQty = stockQty;
        let shipmentsNum = this.productInfo.productList[this.indexProduct].shipmentsNum;
        if (shipmentsNum > stockQty) {
          this.errorClass = false;
          this.errorShow = true;
          this.errorTitle = "发货仓库库位错误";
          this.errorMsg = "发货仓库库存少于发生数量，清重新选择";
          this.setTime();
          return;
        }
      },

      //选择发货仓库后仓库库存已发货数量比较
      blurShipmentsNum: function (_indexNum) {
        let stockQty = this.productInfo.productList[this.indexProduct].stockQty;
        let shipmentsNum = this.productInfo.productList[this.indexProduct].shipmentsNum;
        if (shipmentsNum > stockQty) {
          this.errorClass = false;
          this.errorShow = true;
          this.errorTitle = "发货仓库库位错误";
          this.errorMsg = "发货仓库库存少于发生数量，清重新选择";
          this.setTime();
          return;
        }
      },

      //添加库存商品
      addInventory: function (_obj) {
        let productObj = {};
        productObj.pic = _obj.pic;
        productObj.productInfo = _obj.productInfo;
        productObj.sku = _obj.sku;
        productObj.ebaySKU = '';
        productObj.unitPrice = '';
        productObj.warehouse = _obj.warehouse;
        productObj.warehouseSelect = '';
        productObj.shipmentsNum = '';
        productObj.stockQty = '';
        this.productInfo.productList.push(productObj);
        console.log(productObj)
      },
      closeBack(){
        this.$router.push(`/v1/declare/crossBorder/query`)
      },
      getCurrency(){
        let api = '/v1/dict/currency';
        instance({
          method:'get',
          url:api
        }).then((res)=>{
          if (res.data.success){
            this.currencyList = res.data.data
          }
        })
      },
      //获取退补类型
      getRetreatingType() {
        let vm = this;
        instance.get('/v1/dict/charge').then(function (data) {
          vm.retreatingType = data.data.data;
        })
      },
      handleChoseChannel(flag){
        switch (flag) {
          case 1:
            return 'ebay';
            break;
          case 2:
            return 'Amazon';
            break;
          case 3:
            return 'magento';
            break;
          case 4:
            return '其他';
            break;
          default:
            return '其他'
            break;
        }
      },
      getDetail(id){
        let api = `/v1/9610/order/get?orderNo=${id}`;
        instance({
          method:'get',
          url:api
        }).then((res)=>{
          if (res.data.success){
            let result = res.data.data;
            this.orderInfo.platformOrderId = result.platformOrderId
            this.orderInfo.orderTime = result.orderCreated
            this.orderInfo.record = result.record
            this.orderInfo.currency = result.currency
            this.orderInfo.orderChannelSelect = result.channel
            this.getStore(this.orderInfo.orderChannelSelect);
            if (this.orderInfo.orderChannelSelect) {
              this.modal = true
            }else {
              this.modal = false
            }
            this.orderInfo.id = result.id
            this.orderInfo.storeSelect = result.storeId
            this.orderInfo.loansReceivable = result.total
            this.orderInfo.thePostageReceivable = result.postage
            this.orderInfo.costOfPlatform = result.platformFee
            this.orderInfo.transitionFee = result.transferFee
            this.orderInfo.shroffAccountNum = result.account
            this.orderInfo.payTime = result.payTimeStr
            this.orderInfo.treatType = result.treatType
            this.orderInfo.treatMoney = result.treatMoney
            this.orderInfo.logistics = result.logistics
            this.orderInfo.billCode = result.billCode
            this.orderInfo.orderType = result.orderType
            this.orderInfo.customsNo = result.customsNo
            this.orderInfo.assbillNo = result.assbillNo
            this.orderInfo.bigPackageNo = result.bigPackageNo
            this.orderInfo.smallPackageNo = result.smallPackageNo
            this.orderInfo.payNo = result.payNo
            this.orderInfo.storeName = result.storeName
            this.orderInfo.total = result.applyTotalPrice
            this.message = result.message
            this.remark = result.remark
            this.customerInfo.buyerId = result.buyerId
            this.customerInfo.firstName = result.customerFirstName
            this.customerInfo.lastName = result.customerLastName
            this.customerInfo.receiverFirstName = result.receiverFirstName
            this.customerInfo.receiverLastName = result.receiverLastName
            this.customerInfo.contactNumFrist = result.phone
            this.customerInfo.contactNumSec = result.otherPhone
            this.customerInfo.contactEmail = result.mail
            this.customerInfo.homeCountrySelectCode = result.country
            this.customerInfo.provincialState = result.state
            this.customerInfo.city = result.city
            this.customerInfo.postcode = result.postalCode
            this.customerInfo.houseNum = result.houseNumber
            this.customerInfo.mailingAddress = result.street1
            this.customerInfo.standbyAddress = result.street2
            this.productInfo.productList = result.items || []
            this.changeShop();
          }
        })
      },
      getLogistics(){
        let api = '/v1/dict/logistics';
        instance({
          method:'get',
          url:api
        }).then((res)=>{
          if (res.data.success){
            this.logisticsList = res.data.data
          }
        })
      },
    },
    created() {
      //获取平台列表或者下拉框
      this.getPlatFormList();

      //获取授权平台下的店铺
      this.getStore(this.orderInfo.orderChannelSelect);

      //获取国家信息
      this.getCountry();

      //
      this.getStorage("SMK123456");
      this.getCurrency();
      this.getLogistics();
      this.getRetreatingType();
      this.orderIdEdited =  this.$route.query.orderId;
      this.orderType = this.$route.query.orderType;
      if (this.orderIdEdited ) {
        this.isEdited = true;
        this.getDetail(this.orderIdEdited )
      }else {
        this.isEdited = false;
      }
    },
    computed: {
      platformOrderId() {
        return this.orderInfo.platformOrderId;
      },
      loansReceivable() {
        return this.orderInfo.loansReceivable;
      },
      thePostageReceivable() {
        return this.orderInfo.thePostageReceivable;
      },
      costOfPlatform() {
        return this.orderInfo.costOfPlatform;
      },
      transitionFee() {
        return this.orderInfo.transitionFee;
      },
      time() {
        return this.orderInfo.time;
      },
    },
    watch: {
      // platformTransactionNum: function () {
      //   this.orderInfo.platformTransactionNum = this.orderInfo.platformTransactionNum.replace(/[^0-9]/g, '');
      // },
      loansReceivable: function () {
        this.orderInfo.loansReceivable = this.orderInfo.loansReceivable.replace(/[^0-9\.]/g, '');
      },
      thePostageReceivable: function () {
        this.orderInfo.thePostageReceivable = this.orderInfo.thePostageReceivable.replace(/[^0-9\.]/g, '');
      },
      costOfPlatform: function () {
        this.orderInfo.costOfPlatform = this.orderInfo.costOfPlatform.replace(/[^0-9\.]/g, '');
      },
      transitionFee: function () {
        this.orderInfo.transitionFee = this.orderInfo.transitionFee.replace(/[^0-9\.]/g, '');
      },
      time: function () {
        this.orderInfo.payTime = this.orderInfo.payTime.replace(/[^0-9\.\-]/g, '');
        this.orderInfo.orderTime = this.orderInfo.orderTime.replace(/[^0-9\.\-]/g, '');
      },
    }
  }

</script>

<style  lang="less">

  .creat-order-container{
    background:rgba(255,255,255,1);
    box-shadow:0px 2px 12px 0px rgba(0,0,0,0.06);
    border-radius:4px;
    border:1px solid rgba(228,231,237,1);
    padding-bottom: 40px;
    .buttons{
      text-align: center;
      margin-top: 40px;
    }
    .title-box{
      padding: 0 20px;
      .page-title{
        font-size:16px;
        font-weight:400;
        color:rgba(48,49,51,1);
        line-height: 63px;
        border-bottom: 1px solid #E4E7ED;
      }
    }
    .order-info-box{
      margin: 18px 20px;
      background:rgba(255,255,255,1);
      box-shadow:0px 2px 12px 0px rgba(0,0,0,0.06);
      border-radius:4px;
      border:1px solid rgba(228,231,237,1);
      .info-order{
        margin: 20px;
         .el-row{
           margin-bottom: 15px;
           .el-col{
             &:first-child{
               padding-right: 1%;
             }
           }
           .grid-content{
             p{
               min-width: 150px;
               display: inline-block;
               text-align: right;
               font-size:14px;
               font-weight:600;
               color:rgba(96,98,102,1);
               &.second{
                 min-width: 150px;
               }
               span.need{
                 display: inline-block;
                 position: relative;
                 &:before{
                   content: '*';
                   position: absolute;
                   left: -8px;
                   top: 0;
                   color: red;
                 }
               }

             }
             div.content-desc{
               display: inline-block;
               width: 100%;
               font-size: 14px;
             }
             display: flex;
             align-items: center;
             .el-select{
               width: 100%;
             }
             .el-input{
               width: 100%;
             }
             .el-radio-group{
               width: 100%;
               .el-radio{
                 margin-right: 10px;
                 display: inline-block;
               }
             }
           }
         }
      }
    }

    .message-remark{
     margin: 0 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .left-message,.right-remark{
        width: 49.166%;
        background:rgba(255,255,255,1);
        box-shadow:0px 2px 12px 0px rgba(0,0,0,0.06);
        border-radius:4px;
        border:1px solid rgba(228,231,237,1);
        .text-area{
          width: 100%;
          padding: 20px;
        }
      }
    }

    .client-info{
      background:rgba(255,255,255,1);
      box-shadow:0px 2px 12px 0px rgba(0,0,0,0.06);
      border-radius:4px;
      border:1px solid rgba(228,231,237,1);
      margin: 20px;
      .client-content{
        margin: 20px;
        .el-row{
          margin-bottom: 15px;
          .client-padding{
            padding-right: 1%;
          }
          .grid-content{
            p{
              min-width: 150px;
              display: inline-block;
              text-align: right;
              font-size:14px;
              font-weight:600;
              color:rgba(96,98,102,1);
              &.second{
                min-width: 150px;
              }
              span.need{
                display: inline-block;
                position: relative;
                &:before{
                  content: '*';
                  position: absolute;
                  left: -8px;
                  top: 0;
                  color: red;
                }
              }
            }
            span.content{
              color: #606266;
              font-size: 20px;
              display: inline-block;
            }
            display: flex;
            align-items: center;
            justify-content: left;
            .el-select{
              width: 100%;
            }
            .client{
              display: flex;
              align-items: center;
              width: 100%;
              .client-name{
                width: 48%;
              }
            }

            .el-radio-group{
              width: 100%;
              .el-radio{
                margin-right: 10px;
                display: inline-block;
              }
            }
          }
        }
      }
    }

    .goods-info{
      background:rgba(255,255,255,1);
      box-shadow:0px 2px 12px 0px rgba(0,0,0,0.06);
      border-radius:4px;
      border:1px solid rgba(228,231,237,1);
      margin: 0 20px 20px 20px;
      .goods-table{
        margin: 20px;
        .el-icon-delete{
          color: #409EFF;
          font-size: 20px;
        }
        .el-table{
          margin-top: 15px;
          thead{
            background-color: #F5F7FA;
            tr{
              background-color: #F5F7FA;
              th{
                background-color: #F5F7FA;
                height: 60px;
                line-height: 60px;
                text-align: center;
              }
            }
          }
          tbody{
            tr{
              td{
                text-align: center;
                .el-input{
                  width: 80%;
                }
              }
            }
          }
          .input-with-select{
            width: 200px !important;
          }
        }
      }
    }

    .title-name{
      position: relative;
      &:before{
        content: '';
        position: absolute;
        height: 62%;
        width: 1px;
        border-left: 2px solid #409EFF;
        top: 0;
        bottom: 0;
        left: 0;
        margin: auto 0;
      }
      line-height: 43px;
      padding: 0 18px;
      .name{
        font-size:16px;
        font-weight:400;
        color:rgba(51,51,51,1);
        line-height: 43px;
        border-bottom: 1px solid #E4E7ED;
        i{
          display: inline-block;
          line-height: 43px;
          color: #E4E7ED;
          font-size: 21px;
        }
      }
    }
    .modal-header{
      background: #fff;
      position: relative;
     /* &:after{
        content: '';
        position: absolute;
        height: 1px;
        width: 80%;
        border-bottom: 1px solid;
        bottom: 0;

      }*/
    }
    .modal-footer{
      text-align: center;
    }
    .form-horizontal{
      .form-control{
        width:320px;
        height:40px;
        background:rgba(255,255,255,1);
        border-radius:4px 4px 0px 4px;
        border:1px solid rgba(220,223,230,1);
        margin-right: 15px;
      }
      .el-button{
        width:68px;
        height:40px;
      }
      .table-bordered{
        border: none;
        thead{
          tr{
            th{
              height:60px;
              background:rgba(245,247,250,1);
              border: none;
            }
          }
        }
        tbody{
          tr{
            border-bottom:  1px solid #E4E7ED;
            td{
              border:none;
            }
          }
        }
      }
    }
  }
  .linehe > input{
    line-height: 34px!important;
    height: 36px!important;
  }
  .el-input__inner{
    line-height: 40px!important;
    height: 40px!important;
  }
  .el-date-editor.el-input{
    width: 100%!important;
  }

  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
  }
  /* 火狐 */
  input{
/*    -moz-appearance:textfield;*/
  }
</style>
